//
//  PublishTitleView.swift
//  WBSwift
//
//  Created by maker on 2016/11/18.
//  Copyright © 2016年 maker. All rights reserved.
//

import UIKit

class PublishTitleView: UIView {
    lazy var titleLbl : UILabel = UILabel()
    lazy var nickNameLbl : UILabel = UILabel()
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        setupUI()
    }
    
    required init?(coder aDecoder: NSCoder) {
        
        mprint("init?(coder")
        fatalError("init(coder:) has not been implemented")
    }
}

extension PublishTitleView{
    
    fileprivate func setupUI(){
        self.addSubview(titleLbl)
        self.addSubview(nickNameLbl)
        
        titleLbl.frame = CGRect(x: 0, y: 0, width: self.widths(), height: 25)
        nickNameLbl.frame = CGRect(x: 0, y:(titleLbl.bot()),width: self.widths(), height: 20)
        
        titleLbl.font = UIFont.systemFont(ofSize: 15)
        nickNameLbl.font = UIFont.systemFont(ofSize: 13)
        nickNameLbl.textColor = UIColor.gray
        titleLbl.textAlignment = .center
        nickNameLbl.textAlignment = .center
        titleLbl.text = "发微博"
        nickNameLbl.text = UserInfoViewModel.shareInstance.user?.screen_name
    }
}









